import { connect } from 'react-redux';
import CountUi from '../../components/countUi/CountUI';
import { handleadd, handledecrement, handleasync } from '../../redux/actions';
/* 
const mapDispatchToProps = (dispatch) => {
    return {
        add: num => dispatch(handleadd(num)),
        decrement: num => dispatch(handledecrement(num)),
        tasync: num => dispatch(handleasync(num))
    }
} */


// connect()() 创建并暴露一个Count的容器组件
export default connect(state => ({ count: state }), { handleadd, handledecrement, handleasync })(CountUi);